// 订单状态信息
const componentBehaviors = require('../../../../behaviors/component');
import { COMPONENT_OPTIONS } from '../../../../constants/common';
const { copyText } = require('../../../../common/env');
Component({
    behaviors: [componentBehaviors],
    options: {
        ...COMPONENT_OPTIONS,
    },
    /**
     * 组件的属性列表
     */
    properties: {
        // 状态信息
        statusInfo: {
            type: Object,
            value: {},
        },
        // 快递信息
        deliverInfo: Object,
        // 自提信息
        pickupInfo: Object,
        // 是否是推广模式
        isExpand: {
            type: Boolean,
            value: false,
        },
        isBrand: {
            type: Boolean,
            value: false,
        },
    },
    data: {

    },
    methods: {
        // 取消订单
        cancelAction: function() {
            this.triggerEvent('cancel');
        },
        copyExpressNumber: function () {
            const { deliverInfo } = this.data;
            copyText(`${deliverInfo.platform} ${deliverInfo.platformOrderNum}`);
        },
    }
})
